Ref isnan from cstd namespace.
authorRobert Lipe <robertlipe@gpsbabel.org>
Sun, 5 Nov 2017 00:27:06 +0000 (19:27 -0500)
committerRobert Lipe <robertlipe@gpsbabel.org>
Sun, 5 Nov 2017 00:27:06 +0000 (19:27 -0500)
grtcirc.cc

index 2f6102f35387a533470fefd37168187c98b7e09f..d590bfe582627859f815cbc30b2e537df0d24c79 100644 (file)
@@ -22,6 +22,7 @@
 #include "defs.h"
 #include "grtcirc.h"
 
+#include <cmath>
 #include <errno.h>
 #include <math.h>
 #include <stdio.h>
@@ -85,7 +86,7 @@ double gcdist(double lat1, double lon1, double lat2, double lon2)
 
   res = asin(res);
 
-  if (isnan(res) || (errno == EDOM)) { /* this should never happen: */
+  if (std::isnan(res) || (errno == EDOM)) { /* this should never happen: */
     errno = 0; /* Math argument out of domain of function, */
     return 0;  /* or value returned is not a number */
   }